package com.zcup.designer.construct.composite;

public class Client {
    public static void main(String[] args) {
        Component root = new ConcreteComponent("root");
        root.add(new Leaf("leaf"));
        root.add(new Composite("composite"));

        Component other = new ConcreteComponent("parent");
        other.add(new Leaf("son"));
        root.add(other);
        root.display(1);
    }
}
